package com.l.web.master.system.menu;

import org.l.qiao.Cluster;
import org.l.qiao.KeyType;
import org.l.qiao.Validate;
import org.l.qiao.annotation.Key;
import org.l.qiao.base.LType;

import java.util.Map;

public class Menu extends Cluster {

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^.+$", nullable = false)
    public static final String NAME = "name";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^[\\dA-z]{24}|$", nullable = false)
    public static final String PARENT_ID = "parentId";

    //@Key(keyType = KeyType.ListKey, valueType = LType.LString, check = "^.+$", nullable = false)
    public static final String PARENT = "parent";

    public static final String DEEP = "deep";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = "^.+$", nullable = false)
    public static final String URL = "url";

    @Key(keyType = KeyType.MapKey, valueType = LType.LTYPE_STRING, check = Validate.INTEGER, nullable = false)
    public static final String INDEX = "index";

    public static final String CREATED = "created";

    public Menu() {
        super();
    }

    public Menu(Map<String, Object> map) {
        super(map);
    }

}
